package com.ssf.framework.shiro.session.mgt;

import com.raiyee.hi.boss.redis.RedisUtil;
import com.raiyee.hi.boss.shiro.session.iface.ShiroCacheManagerAware;
import org.apache.shiro.cache.Cache;

/**
 * Created by liolay on 15-7-27.
 */
public class ShiroCacheManagerRedisAdapter implements ShiroCacheManagerAware {

    @Override
    public <K, V> Cache<K, V> getCache(String name) {
        return new JedisShiroCache<K, V>(name);
    }

    @Override
    public void destroy() {
        RedisUtil.shutdown();
    }
}
